package com.yang.concurrent.raw;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @description:todo
 * @auth yangzhiwei
 * @date 2021-04-22 21:47
 */

public class ThreadPoolExecutorTest {
    public static void main(String[] args) {
        /**
         * int corePoolSize,
         *                               int maximumPoolSize,
         *                               long keepAliveTime,
         *                               TimeUnit unit,
         *                               BlockingQueue<Runnable> workQueue
         */
        ThreadPoolExecutor executor = new ThreadPoolExecutor(3,10,10, TimeUnit.MINUTES,new ArrayBlockingQueue<>(10));
        executor.execute(new MyTask());
       // FJTask fjTask;
    }
}
